<template>
	<view class="jc-badge">
		<text class="count smallCount" v-if="count > 0 && count <= 99">{{count}}</text>
		<text class="count bigCount" v-if="count > 99">99+</text>
	</view>
</template>

<script>
	export default{
		props:{
			count: {
				type: [String, Number],
				default: ''
			}
		},
		data() {
			return {
				
			}
		},
	}
</script>

<style lang="scss" scoped>
	.jc-badge{
		flex-shrink: 0;
	}
	.count{
		background-color: $st-color-primary;
		// width: 60rpx;
		// height: 34rpx;
		border-radius: 17rpx;
		font-size: 20rpx;
		font-weight: bold;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #FFFFFF;
	}
	.smallCount{
		width: 34rpx;
		height: 34rpx;
		border-radius: 17rpx;
	}
	.bigCount{
		width: 60rpx;
		height: 34rpx;
		padding: 0 10rpx;
	}
</style>
